]> dgit.raspbian.org Git - gnome-shell.git/commit
status/backlight: Fix keyboard backlight infinite loop
authorBarnabás Pőcze <pobrn@protonmail.com>
Wed, 3 Jan 2024 02:04:46 +0000 (03:04 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 16 Jan 2024 23:30:42 +0000 (23:30 +0000)
commitbe944ff2dcc2bbe25152c0736c20d8045a5581e9
tree5861665fea650d4dd74e4586b5cfaebc30436188
parentf2e51cb72238ab7633f3bf83ac7e14c72551d316
status/backlight: Fix keyboard backlight infinite loop

The logic could enter an infinite loop because it tried to
propagate local changes to g-s-d that were caused by signals sent
by g-s-d. For example:

  1. slider is set to 50
  2. Set(50) dbus call is sent
  3. slider is set to 51
  4. Set(51) dbus call is sent
  5. PropertiesChanged arrives due to Set(50)
  6. this._sliderItem.value is set to 50
  7. notify::value is emitted from this._sliderItem
  8. Set(50) dbus call is sent
  9. PropertiesChanged arrives due to Set(51)
 10. this._sliderItem.value is set to 51
 11. notify::value is emitted from this._sliderItem
 12. Set(51) dbus call is sent

To alleviate this issue, block signal handlers when the local state is
changed due to a remote event.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7111

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3086>
js/ui/status/backlight.js